<?php
  require_once("includes/config.php"); 
if($_SERVER["REQUEST_METHOD"] == "POST")
  {
    $apart=$_POST['apart'];
    $furn = $_POST['furn'];
    $descrip =$_POST['descrip'];
    $price=$_POST['price'];
    $status =$_POST['status'];
    $source=$_POST['source'];
    
    $result = query("UPDATE furnitures SET apartments_id=? , furniture=?, descrip=?, price=?,fur_status=?
                     ,source=? WHERE furnitures_id= ? ", 
        $apart,$furn,$descrip,$price,$status,$source ,$_POST['furn_id']);
      $_SESSION['success_message']="تم التعديل بنجاح";
    redirect("furnitures.php?apart=".$apart);
  }
  else
    apologize("خطأ فى الوصول")
  ?>